package fr.n7.khome.core;

import fr.n7.khome.util.FuzzyFormatException;
import fr.n7.khome.util.InvalidFuzzyValueException;

/**
 * A test class for Fuzzy numbers...
 * 
 * @author bbaccot
 *
 */
public class TestFuzzy {

	public static void main(String[] args) throws InvalidFuzzyValueException {
		try {
			Fuzzy d = Fuzzy.parse("15");
			Fuzzy p = Fuzzy.parse("~15");
			System.out.println("d = "+d);
			System.out.println("p = "+p);
			System.out.println("Pi(p,d) = "+Fuzzy.getLikelihood(d, p));
			System.out.println("Ni(p,d) = "+Fuzzy.getNecessity(d, p));
		} catch (FuzzyFormatException e) {
			e.printStackTrace();
		}

	}

}
